// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 添加农药领取记录 POST /PesType/addPesticideAcquireRecord */
export async function addPesticideAcquireRecordUsingPOST(
  body: API.PesticideAcquireRecord,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/PesType/addPesticideAcquireRecord', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 添加农药使用记录 POST /PesType/addPesticideUsageRecord */
export async function addPesticideUsageRecordUsingPOST(
  body: API.PesticideUsageRecord,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/PesType/addPesticideUsageRecord', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 新增农药种类 POST /PesType/addPesType */
export async function addPesTypeUsingPOST(
  body: API.PesticideType,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/PesType/addPesType', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id删除农药种类 DELETE /PesType/deletePesTypeById/${param0} */
export async function deletePesTypeByIdUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deletePesTypeByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultString_>(`/PesType/deletePesTypeById/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 批量删除农药种类 DELETE /PesType/deletePesTypeList */
export async function deletePesTypeListUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deletePesTypeListUsingDELETEParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultString_>('/PesType/deletePesTypeList', {
    method: 'DELETE',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改农药种类对象 PUT /PesType/modifyPesType */
export async function modifyPesTypeUsingPUT(
  body: API.PesticideType,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPesticideType_>('/PesType/modifyPesType', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询农药种类 GET /PesType/queryAllPesType */
export async function queryAllUsingGET1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAllUsingGET1Params,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageQueryCondition_>('/PesType/queryAllPesType', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询当前施农药人员可使用的农药信息接口 GET /PesType/queryAvailablePesticideList/${param0} */
export async function queryAvailablePesticideListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAvailablePesticideListUsingGETParams,
  options?: { [key: string]: any },
) {
  const { adminId: param0, ...queryParams } = params;
  return request<API.BaseResultListAvailablePesticide_>(
    `/PesType/queryAvailablePesticideList/${param0}`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {}),
    },
  );
}

/** 查询一条农药种类 GET /PesType/queryPesTypeById/${param0} */
export async function queryPesTypeByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryPesTypeByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultPesticideType_>(`/PesType/queryPesTypeById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 根据农药领取记录查询本次的所有施农药记录 GET /PesType/queryUsageRecordByAcquireRecord/${param0} */
export async function queryUsageRecordByAcquireRecordUsingGET1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryUsageRecordByAcquireRecordUsingGET1Params,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResult>(`/PesType/queryUsageRecordByAcquireRecord/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
